// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

import GameConfig from "../config/GameConfig";
import { POP_SHOW_TYPE } from "../constants/Enums";
import PopUpManager from "../manager/PopUpManager";
import Utils from "../utils/Utils";

const {ccclass, property} = cc._decorator;

@ccclass
export default class GameMain extends cc.Component {

    @property(cc.Node)
    gamebtn:cc.Node = null;
    @property(cc.Node)
    tipbtn:cc.Node = null;
    // LIFE-CYCLE CALLBACKS:

    onLoad () {
        this.gamebtn.on("click",()=>{
            PopUpManager.Inst.openPanel(GameConfig.PANEL_NAME.FirstPanel, POP_SHOW_TYPE.BOTTOM_TO_TOP);
        },this)
        this.tipbtn.on("click",()=>{
            Utils.toast("v50 KFC crazy Thursday!!");
        },this)
    }

    start () {

    }

    // update (dt) {}
}
